import { applicationRequest } from '@/static/js/https.js';
import { API_BASE_URL } from '@/static/js/requestBase.js';
const api = applicationRequest;

const install = {
	// 报考数据
	// 获取省份列表
	getProvinceList: async data => {
		return await api('/province/get_province_list', 'POST', data)
	},
	// 获取省份详情
	getProvinceDetail: async data => {
		return await api('/province/get_province_detail', 'POST', data)
	},
	// 获取热门省份
	getHotProvinceList: async data => {
		return await api('/province/get_hot_province_list', 'POST', data)
	},
	// 设置省份
	setProvince: async data => {
		return await api('/province/set_province', 'POST', data)
	},
	// 省份督学老师
	provinceKfData: async data => {
		return await api('/province/get_kf_data', 'POST', data)
	},

	// 获取定位信息
	getLocationInfo: async data => {
		return await api('/province/get_location', 'POST', data)
	},
	// 获取省份功能点
	getProvinceFeature: async data => {
		return await api('/province/get_feature', 'POST', data, true)
	},
	// 获取专科专业
	getCollegeList: async data => {
		return await api('/college/get_college_list', 'POST', data)
	},
	// 获取专科专业树型
	getTreeCollegeList: async data => {
		return await api('/college/get_tree_college_list', 'POST', data)
	},
	
	// 获取本专对照表
	getUniversity: async data => {
		return await api('/college_university/get_university', 'POST', data)
	},
	// 获取对应专业
	universityMajorGetList: async data => {
		return await api('/university_major/get_detail', 'POST', data)
	},
	// 招生专业查对应的学校及招生人数
	getUniversityMajorPlan: async data => {
		return await api('/university_major/get_university_major_plan', 'POST', data)
	},
	// 本科院校列表
	getLicationUniversitySchoolList: async data => {
		return await api('/university_school/get_university_school_list', 'POST', data)
	},
	// 获取本科院校树型结构接口
	getTreeUniversitySchoolList: async data => {
		return await api('/university_school/get_tree_university_school_list', 'POST', data)
	},
	// 获取本科学校对应专业人数
	getUniversitySchoolMajorList: async data => {
		return await api('/university_school/get_university_school_major_plan', 'POST', data)
	},
	// 专业获取招生院校
	getSymbolUniversitySchoolMajorDetail: async data => {
		return await api('/university_school/get_symbol_university_school_major_detail', 'POST', data)
	},
	// 本科专业列表
	getLicationUniversityMajorList: async data => {
		return await api('/university_major/get_university_major_list', 'POST', data)
	},
	// 本科专业获取考试分数
	getUniversityMajorScore: async data => {
		return await api('/university_major/get_score', 'POST', data)
	},
	// 最低分数线
	getUniversityMajorLuquScore: async data => {
		return await api('/university_major/get_university_major_luqu_score', 'POST', data)
	},
	// 获取报数数据详情
	getUniversityMajorMoreDetail: async data => {
		return await api('/university_major/get_more_detail', 'POST', data)
	},
	// 获取省控线折线图数据
	getScoreEcharts: async data => {
		return await api('/university_major/get_score_echarts', 'POST', data)
	},
	// 获取专业院校对应的折线图数据
	getPlanEcharts: async data => {
		return await api('/university_major/get_plan_echarts', 'POST', data)
	},
	// 成绩预测
	getUniversityMajorPrediction: async data => {
		return await api('/university_major/get_prediction', 'POST', data)
	},
	// 成绩预测下半部分
	getUniversityMajorOneScore: async data => {
		return await api('/university_major/get_university_major_one_score', 'POST', data)
	},

	// 拜课网APP转移至H5的接口
	// 获取意向专业列表
	getUniversityMajorTreeList: async data => {
		return await api('/common/get_university_major_tree_list', 'POST', data)
	},

	getRandomString: length => {
		let result = '';
		const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
		const charactersLength = characters.length;
		for (let i = 0; i < length; i++) {
			result += characters.charAt(Math.floor(Math.random() * charactersLength));
		}
		return result;
	}

}

export default install;